package com.hxd.otc.module.my.model;

import com.hxd.otc.api.IWalletApi;
import com.hxd.otc.base.BaseBean;
import com.hxd.otc.module.my.bean.NoSenseBean;
import com.hxd.otc.net.BaseObserver;
import com.hxd.otc.net.RetrofitManager;
import com.uber.autodispose.AutoDisposeConverter;

import io.reactivex.android.schedulers.AndroidSchedulers;

/**
 * Created by lzy on 2018/12/18.
 * description ${vip服务和合作商户 Model}
 */
public class NoSenseModel {

    private static class SingletonHolder {
        private static final NoSenseModel instance = new NoSenseModel();
    }

    public static NoSenseModel getInstance() {
        return NoSenseModel.SingletonHolder.instance;
    }


    public void getNoSenseData(String createTime, String symbol, String publicSource,BaseObserver observer, AutoDisposeConverter<BaseBean<NoSenseBean>> converter) {

        RetrofitManager.getDefault().create(IWalletApi.class)
                .getNoSenseData(createTime, symbol,publicSource)
                .observeOn(AndroidSchedulers.mainThread())
                .as(converter)
                .subscribe(observer);

    }


}
